Spatial cross-validation supporting materials
AgriEngineering manuscript — Figure A3 and Table A7

CONTENTS
Figure_A3.png                         Figure A3 as embedded in the latest R3 manuscript (6542 × 6892 pixels)
tree_month_model_inputs.csv            Analytical tree–month records (94 trees × 12 months = 1128 rows)
spatial_folds_and_tree_positions.csv  Relative image-label positions and spatial/random fold assignments for 94 trees
spatial_out_of_fold_predictions.csv   Spatial-fold held-out predictions for Models A, B and C
spatial_vs_tree_cv_metrics.csv        Spatial and same-size random whole-tree CV summary metrics
fold_level_metrics.csv                Individual-fold validation statistics
reproduce_spatial_cv.py               Python script to verify fold clustering and reproduce CV summary metrics

TO REPRODUCE
1. Install Python 3 with numpy, pandas, and scikit-learn.
2. Extract all files into one folder.
3. Run: python reproduce_spatial_cv.py
4. Compare the generated reproduced_metrics.csv with spatial_vs_tree_cv_metrics.csv.

VERIFICATION CHECKS
- 94 distinct TreeIDs; spatial fold sizes: 16, 21, 15, 21, and 21.
- 1128 unique tree–month records.
- K-means (5 clusters, random_state=20261118, n_init=10) reproduces the provided
  spatial fold assignments up to permutation of cluster labels.
- The script reproduces all 24 rows of summary metrics exactly in the tested environment.
- Spatial-fold overall RMSE: Model B 1.735 and Model C 1.515 SPAD units.

SCOPE
Tree x/y values correspond to numerical label positions identified from the annotated
May 2025 vegetation-index maps. They represent relative image positions rather than
surveyed tree coordinates or measured crown centroids. The analysis withholds all
monthly observations from each test tree, without a geographic buffer. The supplied
positions and fold assignments support reproduction of the reported within-orchard
spatial cross-validation results. Figure_A3.png corresponds to Figure A3 in the manuscript.
